import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import type { App } from 'vue'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

export * from './modules/user'
// export * from './modules/permission'

export { pinia }

export default function registerStore(app: App) {
  app.use(pinia)
}
